﻿using SqlSugar;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace B.ERP.Domain
{
    public class BomModel
    {
        [SugarColumn(IsPrimaryKey = true)]
        public string Id { get; set; }

        [Required]
        [MaxLength(50)]
        /// BOM编号   
        public string BomCode { get; set; }

        [Required]
        [MaxLength(100)]
        /// BOM名称
        public string BomName { get; set; }

       /// <summary>
       /// 产品编号
       /// </summary>
        [MaxLength(50)]
        public string ProductCode { get; set; }
        /// <summary>
        /// 产品名称
        /// </summary>

        [MaxLength(100)]
        public string ProductName { get; set; }
        /// <summary>
        /// 生效时间
        /// </summary>

        public DateTime? EffectiveDate { get; set; }
        /// <summary>
        /// 失效时间
        /// </summary>
        public DateTime? ExpiryDate { get; set; }
        /// <summary>
        /// 备注
        /// </summary>

        [MaxLength(255)]
        public string Remark { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>

        [MaxLength(50)]
        [SqlSugar.SugarColumn(IsNullable = true)]
        public string? CreatedBy { get; set; }
        /// <summary>
        /// <summary>
        /// 创建时间
        /// </summary>
        /// </summary>
        [SqlSugar.SugarColumn(IsNullable = true)]
        public DateTime? CreatedAt { get; set; }
        /// <summary>
        /// 修改人
        /// </summary>

        [MaxLength(50)]
        [SqlSugar.SugarColumn(IsNullable = true)]
        public string? UpdatedBy { get; set; }
        /// <summary>
        /// <summary>
        /// 修改时间
        /// </summary>
        /// </summary>
        [SqlSugar.SugarColumn(IsNullable = true)]
        public DateTime? UpdatedAt { get; set; }
        public bool IsDeleted { get; set; }
    }
}
